package com.cit.manager;

import com.cit.service.SoapService;
import com.cit.service.ValidateService;
import com.cit.service.impl.SoapServiceImpl;
import com.cit.service.impl.ValidateServiceImpl;
/**
 * 
 * @author Lang Yu(lang.yu@hp.com)
 * @time Mar 7, 2011 11:38:27 AM
 * @file CITWsManager.java
 * @package com.cit.manager
 * @version 1.0
 * @see
 * This class is a factory in our system, it will provide an interface to create the Business Interface in the web application.
 * Also there exist some static instances in this class, we implements this feature with singleton pattern, must be sure there
 * is only one instance in web application of Business Interface's implementation.
 */
public class CITWsManager {
	/**
	 * Business Interface to process the validation business
	 */
	private static ValidateService vService = null;
	/**
	 * Business Interface to process the soap message's related business
	 */
	private static SoapService sService = null;
	public static ValidateService newValidator(){
		if( vService == null){
			vService = new ValidateServiceImpl();
		}
		return vService;
	}
	public static SoapService newSoapService(){
		if( sService == null ){
			sService = new SoapServiceImpl();
		}
		return sService;
	}
}
